package cn.wizzer.app.user.modules.models;


import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 流水统计
 *
 * @author .
 */
@Data
@Table("account_record_statistics")
@Comment("流水统计")
public class AccountRecordStatistics extends BaseModel implements Serializable {
    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;


    @Column
    @Comment("日期")
    @ColDefine(type = ColType.VARCHAR, width = 16)
    private String date;


    @Column
    @Comment("提现总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal withdrawAmount;

    @Column
    @Comment("提现笔数")
    private long withdrawNum;


    @Column
    @Comment("提现撤销金额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal withdrawRejectAmount;


    @Column
    @Comment("提现撤销笔数")
    private long withdrawRejectNum;


    @Column
    @Comment("充值总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal rechargeAmount;

    @Column
    @Comment("充值笔数")
    private long rechargeNum;

    @Column
    @Comment("下级返佣总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal subRebateAmount;


    @Column
    @Comment("投资总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal investAmount;

    @Column
    @Comment("投资笔数")
    private long investNum;


    @Column
    @Comment("投资人数")
    private long investPeopleNum;

    @Column
    @Comment("体验金投资人数")
    private long expInvestPeopleNum;

    @Column
    @Comment("撤销投资总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal investRevertAmount;

    @Column
    @Comment("撤销投资笔数")
    private long investRevertNum;


    @Column
    @Comment("投资本金收益总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal investIncomeAmount;


    @Column
    @Comment("发送红包总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal sendRedPacketAmount;

    @Column
    @Comment("发送红包个数")
    private long sendRedPacketNum;


    @Column
    @Comment("过期红包总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal expiredRedPacketAmount;

    @Column
    @Comment("过期红包个数")
    private long expiredRedPacketNum;


    @Column
    @Comment("收到红包总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal receivedRedPacketAmount;

    @Column
    @Comment("收到红包个数")
    private long receivedRedPacketNum;


    @Column
    @Comment("签到金币兑换总额")
    @ColDefine(type = ColType.FLOAT, width = 16, precision = 6)
    @Default("0")
    private BigDecimal ballCoinExchangeAmount;


    @Column
    @Comment("注册人数")
    private long registerNum;


    @Column
    @Comment("登录人数")
    private long loginNum;


    @Column
    @Comment("创建时间")
    //Long不要用ColDefine定义,兼容oracle/mysql,支持2038年以后的时间戳
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;
}
